
from playwright.sync_api import  sync_playwright

with sync_playwright() as p:
    page = p.chromium.launch(headless=False).new_page()
    page.goto("http://www.baidu.com")
    #page.wait_for_timeout(10000)

    print(page.title())
    # print(page.content())
    page.screenshot(path="./baidu.png")


    page.goto("http://www.taobao.com")
    page.go_back()
    page.go_forward()
    page.close()
    page.wait_for_timeout(10000)
    for v in dir(page):
        print(v)